﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="editVote.aspx.cs" Inherits="vote.back_editVote" %>
<%@ Import Namespace="System.Data" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <link rel="stylesheet" href="../style.css" type="text/css" />
<script language="javascript" type="text/javascript" src="../style/JScript.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td>&nbsp;</td>
<td width="100%" background="../images/r_0.gif"></td>
<td>&nbsp;</td>
</tr>
<tr><td></td><td>

    <div>
    <table align="center" cellpadding="4" cellspacing="1" border="1" width=100%  class="toptable grid fixed">
  <tr>
    <td height="25"class="category">
    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%" class="toptable grid " >
            <tr bgcolor="#ffffff">
                <td height="25" bgcolor="#ffffff" class="category t2" >
                    &nbsp;编辑在线调查</td>
                    </tr>
        </table>
        </td>
  </tr>
</table>        
    <div>
        <asp:GridView width="100%" ID="gvVote" runat="server" AutoGenerateColumns="False" OnRowCancelingEdit="gvVote_RowCancelingEdit" OnRowDeleting="gvVote_RowDeleting" OnRowEditing="gvVote_RowEditing" OnRowDataBound="gvVote_RowDataBound" OnRowUpdating="gvVote_RowUpdating">
            <Columns>
                <asp:BoundField DataField="id" HeaderText="编号" ReadOnly="True" />
                <asp:TemplateField HeaderText="标题">
                    <EditItemTemplate>
                        <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td>调查主题：</td>
                            <td align="left"><asp:TextBox ID="tbTitle" runat="server" Width="300px" Text='<%# ((DataRowView)Container.DataItem)["title"] %>'></asp:TextBox>
                            <asp:RequiredFieldValidator
                                    ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" Display="Dynamic" ControlToValidate="tbTitle"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td>选项总数：</td>
                            <td align="left">
                                <asp:DropDownList ID="ddlOpCount" runat="server" AutoPostBack="True">
                                    <asp:ListItem>2</asp:ListItem>
                                    <asp:ListItem>3</asp:ListItem>
                                    <asp:ListItem>4</asp:ListItem>
                                    <asp:ListItem>5</asp:ListItem>
                                    <asp:ListItem>6</asp:ListItem>
                                    <asp:ListItem>7</asp:ListItem>
                                    <asp:ListItem>8</asp:ListItem>
                                    <asp:ListItem>9</asp:ListItem>
                                    <asp:ListItem>10</asp:ListItem>
                                </asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:PlaceHolder ID="phOptions" runat="server"></asp:PlaceHolder>
                            </td>
                        </tr>
                        <tr>
                            <td>选择模式：</td>
                            <td align="left">
                                <asp:RadioButtonList ID="rblSelectPattern" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem>单选</asp:ListItem>
                                    <asp:ListItem>多选</asp:ListItem>
                                </asp:RadioButtonList></td>
                        </tr>
                        <tr>
                            <td>图形格式：</td>
                            <td align="left">
                                <asp:RadioButtonList ID="rblPicStyle" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem>柱状图</asp:ListItem>
                                    <asp:ListItem>饼状图</asp:ListItem>
                                </asp:RadioButtonList></td>
                        </tr>
                    </table>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbTitle" runat="server" Text='<%# ((DataRowView)Container.DataItem)["title"] %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField HeaderText="编辑" ShowEditButton="True" />
                <asp:TemplateField HeaderText="删除">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" CommandName="delete" OnClientClick="return confirm('确定删除吗？')">删除</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    </div>
 
</td><td></td>
</tr>   
<tr>
<td>&nbsp;</td>
<td></td>
<td>&nbsp;</td>
</tr>
</table>
    </div>
    </form>
</body>
</html>
